<template>
  <button @click="isShowDemo = !isShowDemo">显示/隐藏</button>
  <Demo v-if="isShowDemo"></Demo>
</template>

<script>
import Demo from "@/components/Demo";
import {ref} from "vue";

export default {
  name: "App",
  components: {
    Demo,
  },
  setup(props, context) {
    function showHello(value) {
      alert(`Hello, ${value}`);
    }

    let isShowDemo = ref(true);

    return {
      showHello,
      isShowDemo
    };
  },
}
</script>

<style scoped>

</style>